home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / gle / util / manip / varargs.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-11-29  |  949 b   |  48 lines

  1. /* As varargs are so difficult to make work, I've put them 
  2.    in this module by themselfs,  on a DEC5400 it was necessary
  3.    to compile this module using the native C compiler instead of 
  4.    GCC
  5. */
  6.  
  7. #include <varargs.h>
  8. void fner(va_alist)
  9. va_dcl
  10. {
  11.         va_list args;
  12.         char *fmt;
  13.         char string[1024];
  14.  
  15.         va_start(args);
  16.         fmt = va_arg(args, char *);
  17.         vsprintf(string, fmt, args);
  18.         va_end(args);
  19.     fner_do(string);
  20. }
  21. void wprintf(va_alist)
  22. va_dcl
  23. {
  24.         va_list args;
  25.         char *fmt;
  26.         char string[1024];
  27.  
  28.         va_start(args);
  29.         fmt = va_arg(args, char *);
  30.         vsprintf(string, fmt, args);
  31.         va_end(args);
  32.     wprintf_do(string);
  33. }
  34. void printmess(va_alist)
  35. va_dcl
  36. {
  37.         va_list args;
  38.         char *fmt;
  39.         char string[1024];
  40.  
  41.         va_start(args);
  42.         fmt = va_arg(args, char *);
  43.         vsprintf(string, fmt, args);
  44.         va_end(args);
  45.     printmess_do(string);
  46. }
  47.  
  48.